<template>
  <div>
    <el-card class="box-card">
      <el-table :data="tableData"
                style="width: 80%">
        <el-table-column
          prop="Ino"
          label="发票号"
          width="110">
        </el-table-column>
        <el-table-column
          prop="Index"
          label="订单号"
          width="140">
        </el-table-column>
        <el-table-column
          prop="Type"
          label="发票类型"
          width="140">
        </el-table-column>
        <el-table-column
          prop="Look"
          label="抬头类型"
          width="140">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { fetchDatabill } from '../api'

export default {
  data: function () {
    return {
      tableData: [{
        ino: '01',
        index: '2',
        recipients: '王四',
        name: '哑铃',
        type: '增值税',
        look: '个人'
      }
      // {
      //   ino: '02',
      //   type: '增值税',
      //   look: '企业'
      // },
      // {
      //   ino: '03',
      //   type: '普通发票',
      //   look: '个人'
      // },
      // {
      //   ino: '05',
      //   type: '增值税',
      //   look: '个人'
      // }

      ]
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
      fetchDatabill(this.query).then(res => {
        console.log(res)
        this.tableData = res.data.value
        // this.pageTotal = res.pageTotal || 50
      })
    }
  }
}
</script>

<style scoped>

</style>
